package fun.hijklmn.magic.admin.server.enums;

public enum PermissionTypeEnum {

    dir(1, "dir"),
    link(2, "link"),
    btn(3, "btn"),
    ;

    public Integer type() {
        return type;
    }

    public String getName() {
        return name;
    }

    private Integer type;

    private String name;

    PermissionTypeEnum(Integer type, String name) {
        this.type = type;
        this.name = name;
    }

    public static boolean containType(Integer type) {
        for (PermissionTypeEnum permissionTypeEnum : PermissionTypeEnum.values()) {
            if (permissionTypeEnum.type.intValue() == type) {
                return true;
            }
        }
        return false;
    }

}
